<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<jsp:include page="/base.jsp"></jsp:include>
<link href="css/base.css" rel="stylesheet">

</head>
<body>
		<a href="CataSelectparentIdServlet" style="float: right">新增</a><br>
	<table>
		<tr>
			<th>主键序号</th>
			<th>父类目录ID</th>
			<th>目录名称</th>
			<th>排序次数</th>
			<th>是否有效</th>
			<th>创建人</th>
			<th>创建时间</th>
			<th>更新人</th>
			<th>更新时间</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${catalog}" var="cata">
		<tr>
			<td>${cata.rowId}</td>
			<td>${cata.parentId}</td>
			<td>${cata.cataName}</td>
			<td>${cata.rankCount}</td>
			<td>${cata.activeFlag}</td>
			<td>${cata.createBy}</td>
			<td>${cata.createDate}</td>
			<td>${cata.updateBy}</td>
			<td>${cata.updateDate}</td>
			<td>
			<a href="CatalogGoUpdateServlet?rowId=${cata.rowId}">修改</a>
			<a href="javascript:dodelete(${cata.rowId});">删除</a>
			</td>
		</tr>
		</c:forEach>
	</table>
</body>

<script type="text/javascript">
function dodelete(rowId) {
		if(window.confirm("您确定要删除吗？")){
			//通过JS脚本发起URL请求
			location.href="CatalogDeleteServlet?rowId=" + rowId;
		}
	}





</script>
</html>